import java.util.Scanner;

public class test11 {
    public static void main(String[] args) {
        int count = 0;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入开始的数字num1");
        int num1 = sc.nextInt();
        System.out.println("请输入末尾的数字num2");
        int num2 = sc.nextInt();
        if(num1 <= num2){
        for (int i = num1; i <= num2; i++) {
            if (i % 3 == 0 && i % 5 == 0) {
              count++;
            }
        }
        System.out.println(count);
    }
        else System.out.println("输出不合法");
}
}
